The external methods operate through multiple channels, using the remote shell connection for many actions while delegating file transfers to an external transfer utility.
This saves the overhead of encoding and decoding that multiplexing the transfer through the one connection has with the inline methods.
Since external methods need their own overhead opening a new channel, all files which are smaller than tramp-copy-size-limit are still transferred with the corresponding inline method. It should provide a fair trade-off between both approaches.
The alternative method remcp uses the remsh and rcp commands. It should be applied on
machines where remsh is used instead of
rsh.
The performance of this option is also quite good. It may be slower than the inline methods when you often open and close small files however. The cost of the cryptographic handshake at the start of an scp session can begin to absorb the advantage that the lack of encoding and decoding presents.
There are also two variants, scp1 and scp2, that call ‘ssh -1’ and ‘ssh -2’, respectively. This way, you can explicitly select whether you want to use the SSH protocol version 1 or 2 to connect to the remote host. (You can also specify in ~/.ssh/config, the SSH configuration file, which protocol should be used, and use the regular scp method.)
All the ssh
based methods support the ‘-p’ feature where you can specify
a port number to connect to in the host name. For example,
the host name host#42
tells tramp to specify
‘-p 42’ in
the argument list for ssh, and to specify
‘-P 42’ in
the argument list for scp.
This command does not work like Ange-FTP, where ftp is called interactively, and all commands are send from within this session. Instead of, ssh is used for login.
This method supports the ‘-p’ argument.
While rsync performs much better than scp when transferring files that exist on both hosts, this advantage is lost if the file exists only on one side of the connection. A file can exists on both the remote and local host, when you copy a file from/to a remote host. When you just open a file from the remote host (or write a file there), a temporary file on the local side is kept as long as the corresponding buffer, visiting this file, is alive.
This method supports the ‘-p’ argument.
This is also useful for Windows users where ssh, when invoked from an GNU Emacs buffer, tells them that it is not allocating a pseudo tty. When this happens, the login shell is wont to not print any shell prompt, which confuses tramp mightily.
This method supports the ‘-p’ argument.
Before you use this method, you shall check whether your ssh implementation does support this option. Try from the command line
ssh localhost -o ControlMaster=yes
This method supports the ‘-p’ argument.
This method supports the ‘-p’ argument.
This method supports the ‘-P’ argument.
This method supports the ‘-P’ argument.
This method uses the command ‘fsh host -l user/bin/sh -i’ to establish the connection, it does not work to just say fsh host -l user.
There is no inline method using
fsh as the
multiplexing provided by the program is not very useful in
our context. tramp opens just one
connection to the remote host and then keeps it open,
anyway.
The first directory in the localname must be a share name
on the remote host. Remember, that the $
character in which default shares usually end, must be
written $$ due to environment variable
substitution in file names. If no share name is given (i.e.
remote directory /), all available shares are
listed.
Since authorization is done on share level, you will be prompted always for a password if you access another share on the same host. This can be suppressed by Password handling.
MS Windows uses for authorization both a user name and a
domain name. Because of this, the tramp syntax has been extended: you can specify a
user name which looks like user%domain (the real
user name, then a percent sign, then the domain name). So, to
connect to the machine melancholia as user
daniel of the domain BIZARRE, and
edit .emacs in the
home directory (share daniel$) I would specify
the filename /smb
:daniel%BIZARRE
@melancholia:/daniel$$/.emacs.
Depending on the Windows domain configuration, a Windows
user might be considered as domain user per default. In order
to connect as local user, the WINS name of that machine must
be given as domain name. Usually, it is the machine name in
capital letters. In the example above, the local user
daniel would be specified as /smb:daniel%MELANCHOLIA
@melancholia:/daniel$$/.emacs.
The domain name as well as the user name are optional. If no user name is specified at all, the anonymous user (without password prompting) is assumed. This is different from all other tramp methods, where in such a case the local user name is taken.
The smb method supports the ‘-p’ argument.
Please note: If GNU Emacs runs locally
under MS Windows, this method isn't available. Instead of,
you can use UNC file names like //melancholia/daniel$$/.emacs. The only
disadvantage is that there's no possibility to specify
another user name.
tramp supports both imap and imaps methods. The latter one accesses the IMAP server over ssl.
Both methods support the port number specification.
Note, that special handling is needed for declaring a passphrase for encryption / decryption of the messages (see Using an authentication file).